/**
 * ____________________ *
 *  ____ ____ ____ _  _ *
 *  |___ [__] |--< |\/| *
 * ____________________ *
 *
 * THE CORM PROJECT
 *
 * This file may only be used in accordance with the
 * terms of the Academic Free License ("AFL") v. 3.0,
 * as published by the Open Software Initiative.  A
 * copy of this license is provided in this source
 * release, and may be viewed online at:
 *
 * (http://www.opensource.org/licenses/afl-3.0.php)
 */
package org.eremite.corm.order.event;

import org.eremite.corm.Archetype;

import java.util.Set;
import java.util.Date;
import java.io.Serializable;

/**
 * The OrderEvent archetype represents a notable occurence
 * in the lifecycle of an Order.
 */
public class OrderEvent<A extends Serializable> extends Archetype {

    private long orderID;
    private Set<Long> partySignatures;
    private Date dateAuthorized;
    private boolean processed;

    private Date dateOfChange;
    private String reasonForChange;

    private A original;
    private A updated;
    private long originalID;
    private long updatedID;

    private boolean monetary; // optional, indicates a monetary change
    private double percentageChange; // optional

    public long getOrderID() {
        return orderID;
    }

    public void setOrderID(long orderID) {
        this.orderID = orderID;
    }

    public Set<Long> getPartySignatures() {
        return partySignatures;
    }

    public void setPartySignatures(Set<Long> partySignatures) {
        this.partySignatures = partySignatures;
    }

    public Date getDateAuthorized() {
        return dateAuthorized;
    }

    public void setDateAuthorized(Date dateAuthorized) {
        this.dateAuthorized = dateAuthorized;
    }

    public boolean isProcessed() {
        return processed;
    }

    public void setProcessed(boolean processed) {
        this.processed = processed;
    }

    public Date getDateOfChange() {
        return dateOfChange;
    }

    public void setDateOfChange(Date dateOfChange) {
        this.dateOfChange = dateOfChange;
    }

    public String getReasonForChange() {
        return reasonForChange;
    }

    public void setReasonForChange(String reasonForChange) {
        this.reasonForChange = reasonForChange;
    }

    public A getOriginal() {
        return original;
    }

    public void setOriginal(A original) {
        this.original = original;
    }

    public A getUpdated() {
        return updated;
    }

    public void setUpdated(A updated) {
        this.updated = updated;
    }

    public long getOriginalID() {
        return originalID;
    }

    public void setOriginalID(long originalID) {
        this.originalID = originalID;
    }

    public long getUpdatedID() {
        return updatedID;
    }

    public void setUpdatedID(long updatedID) {
        this.updatedID = updatedID;
    }

    public boolean isMonetary() {
        return monetary;
    }

    public void setMonetary(boolean monetary) {
        this.monetary = monetary;
    }

    public double getPercentageChange() {
        return percentageChange;
    }

    public void setPercentageChange(double percentageChange) {
        this.percentageChange = percentageChange;
    }
}
